#ifndef __RENDERNODE_H__
#define __RENDERNODE_H__

#include "RenderObj.h"
#include <gl/gl.h>
#include <vector>
#include <map>

class RenderNode
{
public:
	RenderNode();
	~RenderNode();

	bool m_SetTransform;
	void SetTransform( float trf[16] );
	void SetScale( float s[3] );
	void SetObj( std::string obj_name );
	void ResetMaterials( const std::vector<std::string>& mats );
	void SetSMat( const std::string& smat_name );
	void AddChild( RenderNode* rd );
	void SetFather( RenderNode* rd );
	 RenderNode* GetFather();

	float* GetTransform();
	float* GetScale();
	std::string GetObj();
	std::vector<std::string> GetResetMaterials();
	unsigned int ChildNum();
	RenderNode* GetChild( int idx );
	std::vector<RenderNode*>& GetChild();

	void Show();
	void Paint();

private:
	RenderNode*     m_Father;
	float			m_Transform[16];
	float			m_Scale[3];
	std::string		m_ObjName;
	std::string					m_SMat;
	std::vector<std::string>	m_resetMaterials;
	std::vector<RenderNode*>	m_ChidlRenderNodes;
};

#endif //__RENDERNODE_H__